# Generate the portal files which are not to be produced on-the-fly
# and install them on place, along with the CSS stylesheets.

include ../SETTINGS

include ../COMMON

# Now included in general SETTINGS file in order to make webdb's lpmake
# reachable
# STATICPAGESGEN=StaticPages 
# WEBDBTEMPLATESGEN=WebDbTemplates
# CSSFILES=CssFiles

foo:
	@echo Please state a target

# "generate" should take the skeletons and fill them in with the variant data
compile: compile-processor
	./process_templates all \
		Templates/WebPageBodies $(STATICPAGESGEN) \
	&& \
	./process_templates header \
		Templates/WebDBTemplatesHeader $(WEBDBTEMPLATESGEN) \
	&& \
	./process_templates navigation \
		Templates/WebDBTemplatesNav $(WEBDBTEMPLATESGEN)

compile-processor:
	CIAOALIASPATH=$(CIAOALIAS) $(CIAOC) process_templates 

just-install:
	-/usr/bin/install -d \
		--mode=$(WEB_DIR_PERMISSIONS) --group=$(WWW_GROUP) \
		$(CSS_DIR)
	-/usr/bin/install \
		--mode=$(WEB_FILE_PERMISSIONS) --group=$(WWW_GROUP) \
		$(CSSFILES)/*.css $(CSS_DIR)
	-/usr/bin/install \
		--mode=$(WEB_FILE_PERMISSIONS) --group=$(WWW_GROUP) \
		$(STATICPAGESGEN)/*.html $(INSTALLATION_ROOT)
#
# All images are installed by the Makefile in the Images directory
# 	-/usr/bin/install \
# 		--mode=$(WEB_FILE_PERMISSIONS) --group=$(WWW_GROUP) \
# 		../Images/*.jpg $(INSTALLATION_ROOT)

just-install-test:
	cp -f CssFiles/*.css $(CSS_DIR_TEST)


clean:
	-/bin/rm -rf $(STATICPAGESGEN) $(WEBDBTEMPLATESGEN)

distclean: clean
	-/bin/rm -f process_templates

